/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 *
 * @author mehdi
 */
@Entity
public class Company implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    
   private Long Coid;
   
   private String Naco;
   
   private String Emco;
   
   private String Adco;
   
   private int Faco;
   
   private int Phco;
   
   private String Seco;
   
   private String Cico;
  
   private String Coco;
   
   private String code; 
   
 
    @OneToOne(cascade= CascadeType.ALL)
   private  Account account;
   @OneToMany(cascade= CascadeType.ALL)
   private  List<Learner> learner;

    public Company() {
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

   
    public Long getId() {
        return Coid;
    }

    public void setId(Long id) {
        this.Coid = id;
    }

    public String getAdco() {
        return Adco;
    }

    public void setAdco(String Adco) {
        this.Adco = Adco;
    }

    public String getCico() {
        return Cico;
    }

    public void setCico(String Cico) {
        this.Cico = Cico;
    }

    public String getCoco() {
        return Coco;
    }

    public void setCoco(String Coco) {
        this.Coco = Coco;
    }

    public String getEmco() {
        return Emco;
    }

    public void setEmco(String Emco) {
        this.Emco = Emco;
    }

    public int getFaco() {
        return Faco;
    }

    public void setFaco(int Faco) {
        this.Faco = Faco;
    }

    public String getNaco() {
        return Naco;
    }

    public void setNaco(String Naco) {
        this.Naco = Naco;
    }

    public int getPhco() {
        return Phco;
    }

    public void setPhco(int Phco) {
        this.Phco = Phco;
    }

    public String getSeco() {
        return Seco;
    }

    public void setSeco(String Seco) {
        this.Seco = Seco;
    }

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }

    public List<Learner> getLearner() {
        return learner;
    }

    public void setLearner(List<Learner> learner) {
        this.learner = learner;
    }

    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (Coid != null ? Coid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Company)) {
            return false;
        }
        Company other = (Company) object;
        if ((this.Coid == null && other.Coid != null) || (this.Coid != null && !this.Coid.equals(other.Coid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.Company[ id=" + Coid + " ]";
    }
    
}
